<?php 
include('../common/common.php');
include('../common/checksession.php');
checksession("../index.php");
include('../../inc/conn.php');

// 获取变量
$att_id=exquot(stripslashes(excode($_POST['att_id'])));
$att_name=exquot(stripslashes(excode($_POST['att_name'])));
$gurl=$_POST['gurl'];

if($att_id==""||$att_name==""){
	showmsg_h("数据填写不完整!","../moduls/arc_att.php");
	die;
}

$db=db_connect();
$insertKey="`att_id`,`att_name`";
$insertValue="'".$att_id."','".$att_name."'";
$sql=insert_sql("`".PRETABLE."arcatt`",$insertKey,$insertValue);
if($db->query($sql)){
	ShowMsg_h("成功添加!",$gurl);
}else{
	ShowMsg_h("添加失败,返回重新添加!",$gurl);
}
$db->close();
?>